var fs=require("fs");
var path=require("path");


var filePath1=path.join(__dirname,"/from.txt");
var filePath2=path.join(__dirname,"/to.txt");
var readable1=fs.createReadStream(filePath1);
var writable2=fs.createWriteStream(filePath2);
// readable1.on("data",function(chunk){
//     var filePath2=path.join(__dirname,"/to.txt");
//     var writable2=fs.createWriteStream(filePath2);
//     readable1.pipe(writable2);
//     console.log(chunk.toString("utf-8").toUpperCase());
// });

// readable1.on("end",function(){
//     console.log("readable ended");
// })
readable1.pipe(writable2);
//readable1.pipe(process.stdout);
